import requests
import plotly.express as px

url='http://api.github.com/search/repositories'
url += '?q=language:python+sort:stars:>10000'
headers = {'Accept': 'application/vnd.github.v3+json'}
r = requests.get(url, headers=headers)
print(f"Status code: {r.status_code}")

response_dict = r.json()
print(f"Completed repositories: {response_dict['incomplete_results']}")
repo_dicts = response_dict['items']
repo_names,stars,hover_txt=[],[],[]
for repo_dict in repo_dicts:
    repo_names.append(repo_dict['name'])
    stars.append(repo_dict['stargazers_count'])

    owner = repo_dict['owner']['login']
    description = repo_dict['description']
    hover_txt.append(f"{owner}: {description}")
fig=px.bar(x=repo_names, y=stars,hover_name=hover_txt)
fig.show()